<?php defined('IN_ADMIN') or exit('No permission resources.');?>
<?php include $this->admin_tpl('header', 'admin');?>
<script language="javascript" type="text/javascript" src="<?php echo JS_PATH?>cookie.js"></script>
<h3 style="padding-left: 20px;padding-top: 10px">
	<?=$info['option']?>——订单统计
	<a href="./index.php?m=vote&c=vote&a=options&subjectid=<?=$info['subjectid']?>" style="font-size:14px;color: #0000FF"><em>返回上一级</em></a>
</h3>

<div class="pad-lr-10">

	<form name="searchform" action="" method="get">
		<input type="hidden" value="<?php echo ROUTE_M;?>" name="m">
		<input type="hidden" value="<?php echo ROUTE_C;?>" name="c">
		<input type="hidden" value="<?php echo ROUTE_A;?>" name="a">
		<input type="hidden" value="<?php echo $_SEEEION['pc_hash'];?>" name="pc_hash">
		<input type="hidden" value="<?=$id?>" name="id">
		<table width="100%" cellspacing="0" class="search-form">
			<tbody>
			<tr>
				<td>
					

					<div class="explain-col">
						用户名称：
						<input name="user_name" type="text" value="<?php if(isset($_GET['user_name'])) {echo $_GET['user_name'];}?>"
							   class="input-text" />
						订单编号：
						<input name="order_num" type="text" value="<?php if(isset($_GET['order_num'])) {echo $_GET['order_num'];}?>"
							   class="input-text" />
						<input type="submit" name="search"  class="button" value="<?php echo L('search')?>" />
					</div>


				</td>
			</tr>
			</tbody>
		</table>
	</form>

	<form name="myform" action="?m=vote&c=vote&a=vote_del" method="post"
		onsubmit="return confirm('<?php echo L('confirms')?>')">
		<div class="table-list">
			<table width="100%" cellspacing="0">
				<thead>
					<tr>
						<th align="center" width="57">ID</th>
						<th align="center" width="150">订单编号</th>
						<th align="center">用户名称</th>
						<th align="center">订单描述</th>
						<th align="center" width="100">支付方式</th>
						<th align="center" width="100">价格</th>
						<th align="center" width="57">个数</th>
						<th align="center" width="150">创建时间</th>
					</tr>
				</thead>
				<tbody>
<?php
if (!empty($lists)) {
foreach ($lists as $k => $v) {
    ?>
    <tr>
		<td align="center"><?php echo $v['id']?></td>
		<td align="center"><?php echo $v['order_num']?></td>
		<td align="center"><?php echo $v['user_name']?></td>
		<td align="center"><?php echo $v['order_describe']?$v['order_describe']:'<font color="red">（未设置）</font>'?></td>
		<td align="center"><?php echo $v['pay_type']==1?'微信支付':'<font color="red">（未设置）</font>';?></td>
		<td align="center"><?php echo $v['price']?$v['price'].'元':'<font color="red">（未设置）</font>';?></td>
		<td align="center"><?php echo $v['count']?></td>
		<td align="center"><?php echo $v['create_time']?></td>
	</tr>
<?php
}
} else {
	echo "<tr><td colspan='8' style='color:red;font-size:18px;text-align:center;'><span>暂无数据！</span></td></tr>";
}
?>
</tbody>
			</table>

			<!-- <div class="btn">
				<label for="check_box">
					<a href="#"
					onClick="javascript:$('input[type=checkbox]').attr('checked', true)"><?php echo L('select_all')?></a>/<a
					href="#"
					onClick="javascript:$('input[type=checkbox]').attr('checked', false)"><?php echo L('cancel')?></a></label>
					<input type="button" class="button" value="<?php echo L('listorder');?>" onclick="myform.action='?m=vote&c=vote&a=listorder&dosubmit=1&steps=<?php echo $steps;?>';myform.submit();"/>
				<input type="submit" class="button" name="dosubmit"
					value="<?php echo L('deleteoption')?>" />
			</div> -->

			<div id="pages"><?php echo $pages?></div>
		</div>
	</form>
</div>
<script type="text/javascript">
	setcookie('refersh_time', 0);
	function refersh_window() {
		var refersh_time = getcookie('refersh_time');
		if(refersh_time==1) {
			window.location.reload();
		}
	}
	setInterval("refersh_window()", 1500);
</script>
</body>
</html>